<div id="header" class="l-f l-f-middle">
    <div id="headerLeft"><i class="iconfont">&#xf602;</i></div>
    <div id="headerTitle" class="l-f-g1 t-center">机组之家</div>
    <div id="headerRight"></div>
    <script>
        $('#headerLeft i').on('click', function(){
            history.back();
        });
    </script>
</div>

<div id="bodyer">
    <div id="insideBanner" class="swiper-container">
        <div class="swiper-wrapper">
            <?php
                if(empty($ad)){
                    foreach($ad as $v){

                    ?>
            <div class="swiper-slide"><img src="<?=$v['img_path'];?>" alt=""/></div>

            <?php
                    }
                }else{
                    ?>
            <div class="swiper-slide"><img src="/img/insideBanner.png" alt=""/></div>
            <div class="swiper-slide"><img src="/img/insideBanner.png" alt=""/></div>
            <div class="swiper-slide"><img src="/img/insideBanner.png" alt=""/></div>
            <div class="swiper-slide"><img src="/img/insideBanner.png" alt=""/></div>
            <?php
                }
            ?>
        </div>
        <!-- Add Pagination -->
        <div class="swiper-pagination"></div>
    </div>
    <script>
        new Swiper('.swiper-container', {
            pagination: '.swiper-pagination',
            paginationClickable: true
        });
    </script>
    <div id="company">
        <div class="cotegory l-f l-f-middle l-f-stretch t-center">
            <div class="item l-f-g1">
                <a href="#"><img src="/img/categoryIcon1.png" alt=""/>发电机组</a>
            </div>
            <div class="space"></div>
            <div class="item l-f-g1">
                <a href="#"><img src="/img/categoryIcon2.png" alt=""/>柴油机</a>
            </div>
            <div class="space"></div>
            <div class="item l-f-g1">
                <a href="#"><img src="/img/categoryIcon3.png" alt=""/>发电机</a>
            </div>
            <div class="space"></div>
            <div class="item l-f-g1">
                <a href="#" class="current"><img src="/img/categoryIcon4_current.png" alt=""/>零部件</a>
            </div>
        </div>
        <div class="hd">
            <h3>零部件系列合作商家：</h3>
        </div>
        <div class="bd t-center">
            <div class="row l-f">
                <?php
                    if(empty($customer)){
                        echo "</div>";exit;
                    }
                    foreach($customer as $k => $v){
                ?>
                <div class="item l-f-g1"><a href="<?=$v['web_site'];?>"><?=$v['name'];?></a></div>
                <?php
                    if(count($customer) == ($k+1)){
                        echo '</div>';
                    }

                    if($k%2 == 0 && $k != 0){
                        ?>
                        </div>
                        <div class="row l-f">
                    <?php
                        }
                    }
                    ?>

        </div>
    </div>
</div>

<?=$this->render('_foot');?>